send message
To send a message simply means to call a window or grid function, or any other function
designed to take window and/or grid messages.
To send a message to a window means to call the window function assigned to the window
specified in the message. That's what XgrProcessMessages() does when it processes a
message.
To send a message to a grid means to call the grid function assigned to the grid specified
in the message. That's what window functions do to process grid messages.
XuiSendMessage
The best way to send a message is to pass the whole message to XuiSendMessage() and let it
look up and call the window or grid function assigned to the window or grid in the
message:
XuiSendMessage ( wingrid, message, v0, v1, v2, v3, r0, r1 )
XuiSendMessage ( window, message, v0, v1, v2, v3, r0, r1 )
XuiSendMessage ( grid, message, v0, v1, v2, v3, kid, r1 )
XuiSendMessage() looks at message to determine whether each message is a window message or
grid message, which determines whether the first argument is window or grid . This makes
it possible for XuiSendMessage() to call the correct window or grid function.
XuiSendMessage() passes 8 message arguments to the functions it calls, so all window and
grid functions must accept 8 XLONG arguments. The last argument of window and grid
functions are declared to accept ANY data type so they can also receive a STRING variable,
composite variable, or an array of any valid type.
Your programs can pass any combination of the v0,v1,v2,v3,r0,r1 arguments by reference to
receive return values from the function called by XuiSendMessage() .
XuiSendMessage() validates the grid,message,kid arguments, looks up the grid function and
calls it, passing all 8 arguments. The last 6 arguments are passed by reference so those
arguments passed to XuiSendMessage() by reference can be returned to the calling function.